package io;

import java.io.*;

public class TestCopy {

    //文件复制   从inputStream读==数据==outputSteam写
    public static void main(String[] args) throws IOException {
        //1.创建流  avi  exe  doc  ppt
        InputStream input=new FileInputStream("d:\\笔记\\Apifox-2.3.26.exe");
        OutputStream output=new FileOutputStream("d:\\Apifox.exe");
        //2倒腾数据
        byte arr[]=new byte[1024];
        int length=0;
        while((length=input.read(arr))!=-1){
            output.write(arr,0,length);
        }
        //3.关闭
        input.close();;
        output.close();
    }
}
